// FindTheAverageScore.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>

int main(int argc, char* argv[])
{
	float total = 0, max, min;

	max = 0;
	min = 10;

	for(int i = 1; i <=10; i++)
	{
		float temp;

		do
		{
			cout<<"\nPlease enter your score: ";
			cin>>temp;
		} while(temp < 0 || temp > 10);

		if(temp > max)
		{
			max =  temp;
		}

		if(temp < min)
		{
			min = temp;
		}

		total += temp;
	}

	cout<<"The average score is "<<(total - max - min)/8<<endl;
	

	return 0;
}

